from lib.server import app
from lib.net.index import wlan

__service__ = "http_server"
__description__ = "start http or tcp server"


def init():
    # 检查当前网络状态和网络模式
    if not wlan.is_connected():
        print("wifi not connected")


async def run():
    return await app.start_server()
